Conversation
pavel-kirienko
left a comment
There was a problem hiding this comment.
-
Disabling the main activity makes the CAN module useless. What is the rationale behind this?
-
Plug-and-play and bitrate detection are essential to avoid bricking the device by accidentally starting the bootloader with incorrect settings, or losing the power mid-upgrade, when the bootloader has to start with unknown configuration. These cannot be disabled.
-
To a lesser extent, the above applies to the version detection as well. The difference is that there may be setups that only need a single version of the protocol, which is known in advance. In that case, however, you can just supply the desired protocol version to the CANNode; a good compiler should be able to weed out dead branches automatically.
Please elaborate on your rationale, or I will close this PR.
|
Your right i don't need disable main activity, if i choose version in compile time, but i need disable version, node and bitrate detection to decline memory usage, because in current version compiler don't remove this code I am use |
|
Features disabling the plug-and-play node-ID allocation and bitrate detection will not be accepted. The version detection could be made optional, but first I would like to take a closer look at your case to understand why the compiler is not eliding the code when it is not used. Please share the relevant part of your application and the full list of compiler flags. |
Opportunity of disable some can activities to optimize memory usage